<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        const ws=new WebSocket("ws://192.168.29.138:8008/test");

        ws.onopen=function () {
            console.log("连接服务器");
            ws.send("user.age:my age is 19");
            ws.send("user.sex:my sex is male");
        };
        ws.onmessage=function (event) {
            console.log(event.data)
        }
    </script>
</head>
<body>

</body>
</html>